package ym.ecrm.core.domain.financeManagement;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.systemManagement.User;

/**
 * 应付账款类
 * @author fage
 *version 1.0
 */
@Entity
@Table(name = "t_accountsPayable")
public class AccountsPayable extends BaseEntity{
	
	/**
	 * accountsPayableCode 应付账款编号
	 */
	private String accountsPayableCode;
	/**
	 * state 状态
	 */
	private String state;
	/**
	 * target 付款对象
	 */
	private String target;
	/**
	 * sum 金额
	 */
	private String sum;
	/**
	 * contact 联系人
	 */
	private String contact;
	/**
	 * phone 联系电话
	 */
	private String phone;
	/**
	 * reason 付款原因
	 */
	private String reason;
	/**
	 * user 负责人
	 */
	@ManyToOne(targetEntity = User.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "userId")
	private User user;
	public String getAccountsPayableCode() {
		return accountsPayableCode;
	}
	public void setAccountsPayableCode(String accountsPayableCode) {
		this.accountsPayableCode = accountsPayableCode;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getTarget() {
		return target;
	}
	public void setTarget(String target) {
		this.target = target;
	}
	public String getSum() {
		return sum;
	}
	public void setSum(String sum) {
		this.sum = sum;
	}
	public String getContact() {
		return contact;
	}
	public void setContact(String contact) {
		this.contact = contact;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	
	
}
